<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>发布房间信息</title>
    <meta name="viewport"
          content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no"/>
    <link href="/landlord/css/put_all.css" rel="stylesheet"
          type="text/css"/>
    <style>

        label {
            font-size: 28px;
            color: #636281;
            margin-bottom: 70px;
        }

    </style>

    <script type="text/javascript">
        top.setTitle("");
    </script>

</head>

<body>

<div class="main-part-two">

    <div class="form-info">


        <input type="hidden" name="_flowExecutionKey"
               value="${flowExecutionKey} }"/>

        <div>
            <div style="text-align: center;height: 200px">

                <div style="padding-top: 50px">
                    <label>
                        添加完成,将在 <input id="sec" style="background-color: transparent;border: none;width: 15px" readonly
                                      value="5"/> 秒钟后关闭当前窗口...
                    </label>
                </div>
            </div>
        </div>

        <div class="foot-box">
            <table>
                <tr>
                    <td>
                        <input class="btn-st01" type="button" onclick="history.back();" value="关闭">
                    </td>
                </tr>
            </table>
        </div>
    </div>

</div>


<script type="text/javascript" src="https://lib.sinaapp.com/js/jquery/1.9.1/jquery-1.9.1.js"></script>

<script type="text/javascript">

    top.successEnd('${room.id}');

    var sec = $('#sec');
    timer=setInterval(function () {


        var i = sec.val();
        i--;
        if (i === 0) {
            clearTimeout(timer);
            history.back();
            timer = setTimeout(function () {
                alert("返回失败,请手动关闭当前窗口");
            }, 3000);
        }
        sec.val(i);
    }, 1000);

    //手动托管返回事件
    window.history.pushState(null, null, "");
    window.addEventListener("popstate", function (e) {
        top.closeThis();
    });

</script>

</body>
</html>